<?php

use yii\widgets\ActiveForm;

$model = new \backend\models\UploadFileForm();
$form = ActiveForm::begin([
    'id' => 'upload',
    'options' => ['enctype' => 'multipart/form-data'],
])
?>

<?= $form->field($model,'file')->fileInput(['multiple'=>'multiple']) ?>

    <button>上传</button>
<?php ActiveForm::end() ?>